package com.heima.wemedia.v1.controller;

import com.heima.common.dtos.PageResult;
import com.heima.common.dtos.ResponseResult;
import com.heima.model.admin.dtos.NewsAuthDto;
import com.heima.model.media.dtos.WmNewsPageDto;
import com.heima.wemedia.service.WmNewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class WemediaReviewController {
    @Autowired
    private WmNewsService wmNewsService;

    @PostMapping("api/v1/news_auth/list")
    public PageResult newsAuth(@RequestBody WmNewsPageDto dto){
      return wmNewsService.newsAuth(dto) ;
    }
    @GetMapping("api/v1/news_auth/one/{id}")
        public ResponseResult one(@PathVariable("id")Integer id){
        return wmNewsService.one(id);
    }
}
